package cn.com.connext.scrm.service;

import cn.com.connext.scrm.domain.master.MdmHelpFullCall;
import cn.com.connext.scrm.repository.master.MdmHelpFullCallRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/***
 *  created by wangzhan on 2018/01/24
 *
 *  小程序 活动管理
 */
@Service
@Transactional
public class MdmHelpFullCallService {

    @Autowired
    private MdmHelpFullCallRepository mdmHelpFullCallRepository;

    public void save(MdmHelpFullCall mdmHelpFullCall) {
        mdmHelpFullCallRepository.save(mdmHelpFullCall);
    }

    public MdmHelpFullCall findByCreateUnionIdAndMdmHelpActivityId(String createUnionId, Long mdmHelpActivityId) {
       return mdmHelpFullCallRepository.findByCreateUnionIdAndMdmHelpActivityId(createUnionId,  mdmHelpActivityId);
    }

    public void updateByCreateUnionIdAndMdmHelpActivityId(String createUnionId, Long mdmHelpActivityId) {
        mdmHelpFullCallRepository.updateByCreateUnionIdAndMdmHelpActivityId(createUnionId,  mdmHelpActivityId);
    }

}
